/**
 * 
 */
package com.epart.widget.domain;

import com.epart.widget.util.Base64Util;

/**
 * 관리자 도메인 클래스
 * 
 * @author cwsong
 * @version 2010. 9. 7.
 */
public class AdminAdministrator {

	private String adminId; // 관리자 아이디
	private String adminPassword; // 비밀번호
	private int adminLevel; // 관리자 레벨 1: 관리자. 2: 부관리자(부관리자)
	private String subAdminMenu; // 부관리자 사용가능한 메뉴 ,로 구분된 문자열

	/**
	 * @return the adminId
	 */
	public String getAdminId() {
		return adminId;
	}

	/**
	 * @param adminId
	 *            the adminId to set
	 */
	public void setAdminId(String adminId) {
		this.adminId = adminId;
	}

	/**
	 * @return the adminPassword
	 */
	public String getAdminPassword() {
		return adminPassword;
	}

	/**
	 * @param adminPassword
	 *            the adminPassword to set
	 */
	public void setAdminPassword(String adminPassword) {
		this.adminPassword = adminPassword;
	}

	/**
	 * @return the adminLevel
	 */
	public int getAdminLevel() {
		return adminLevel;
	}

	/**
	 * @param adminLevel
	 *            the adminLevel to set
	 */
	public void setAdminLevel(int adminLevel) {
		this.adminLevel = adminLevel;
	}

	/**
	 * @return the subAdminMenu
	 */
	public String getSubAdminMenu() {
		return subAdminMenu;
	}

	/**
	 * @param subAdminMenu
	 *            the subAdminMenu to set
	 */
	public void setSubAdminMenu(String subAdminMenu) {
		this.subAdminMenu = subAdminMenu;
	}

	/**
	 * 비밀번호가 맞는지 확인한다.
	 * 
	 * @param memberPassword
	 * @return 확인결과
	 */
	public boolean isPasswordCorrect(String memberPassword) {
		return this.adminPassword.equals(Base64Util.encode(memberPassword));
	}

}
